package com.learn.project2.model.vo.admin.feedback;

import com.learn.project2.bean.MarketFeedback;
import com.learn.project2.model.vo.admin.user.UserListVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description: 意见反馈的响应数据封装
 * @author wxy
 * @date 2022-01-08 14:39
 * @version 1.0
 */
@NoArgsConstructor
@Data
public class FeedbackListVO {

    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketFeedback> list;

    public static FeedbackListVO data(long total, Integer pages, Integer limit, Integer page, List list) {
        FeedbackListVO feedbackListVO = new FeedbackListVO();
        feedbackListVO.setTotal((int) total);
        feedbackListVO.setPages(pages);
        feedbackListVO.setPage(page);
        feedbackListVO.setLimit(limit);
        feedbackListVO.setList(list);
        return feedbackListVO;
    }

}
